package com.lanhai.zhonglai.enums;

public enum AgvMountTypeEnum {
	AllEmpty(0),
	AllFull(11),
	UpEmptyAndDownFull(1),
	UpFullAndDownEmpty(10),
	Error(2);
	
	AgvMountTypeEnum(int i ) {
		code=i; 
	}
	private int code;
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	

	public static AgvMountTypeEnum getAgvMountTypeEnumByCode(int code){
    	AgvMountTypeEnum as = null;
    	switch (code) {
    	case 0:
    		as = AgvMountTypeEnum.AllEmpty; 
    		break;
    	case 1:
    		as = AgvMountTypeEnum.UpEmptyAndDownFull; 
    		break;
    	case 10:
    		as = AgvMountTypeEnum.UpFullAndDownEmpty; 
    		break;
    	case 11:
    		as = AgvMountTypeEnum.UpFullAndDownEmpty; 
    		break;
    	  
    	default:
    		 as=AgvMountTypeEnum.Error;
    		 break;
    	}
    	return as;
    }
}
